import { http, toast} from '@/uni_modules/uview-plus'

// get请求，用户信息
export const getUserInfo = (data={custom:{loading:false}}) => http.get('/api/user', data)

// post请求，用户登录
export const authType = (params, config = {custom: {loading:true,noAuth:true}}) => http.get('/api/v2/routine/auth_type', {...config,...params})

// post请求，用户登录
export const authLogin = (params, config = {custom: {loading:true,noAuth:true}}) => http.get('/api/v2/routine/auth_login', {...config,...params})

// post请求，绑定手机号
export const bindingPhone = (params, config = {custom: {loading:true,noAuth:true}}) => http.post('/api/v2/routine/binding_phone', params,config)

// post请求，站内信
export const messageSystem = (params, config = {custom: {loading:true,noAuth:false}}) => http.get('/api/user/message_system/list', {...config,...params})

// post请求，站内信详情
export const messageSystemDetail = (id,params, config = {custom: {loading:true,noAuth:false}}) => http.get('/api/user/message_system/detail/'+id, {...config,...params})

// post请求，站内信删除
export const messageSystemDel = (params, config = {custom: {loading:true,noAuth:false}}) => http.get('/api/user/message_system/edit_message', {...config,...params})

// post请求，余额记录
export const spreadCommission = (params, config = {custom: {loading:true,noAuth:false}}) => http.get('/api/integral/list', {...config,...params})

